<?php defined('IN_HOPECMS') or exit('Access Denied'); ?>
<form name="add_model" method="post">
	<div class="content-title">添加模型</div>
	<div id="tab">
		<div class="tab-title">
			<ul>
				<li class="li active">模型信息</li>
			</ul>
		</div>
		<div class="clear"></div>
		<div class="tab-content">
			<table class="table-input" cellpadding="0" border="0" cellspacing="0" width="100%">
				<tr>
					<td class="td-title">模型名称：</td>
					<td class="td-value"><input type="text" v="re" msg="请输入模型名称" value="<?php if (isset($model['name'])): echo $model['name']; endif;?>" name="name" /></td>
					<td class="td-mark"><span class="col-red">*</span> 请输入模型名称</td>
				</tr>
				<tr>
					<td class="td-title">数据表名：</td>
					<td class="td-value"><input type="text" v="re" msg="请输入数据表名" reg="w+" regmsg="数据表名只允许字母、数字和下划线" value="<?php if (isset($model['table_name'])): echo $model['table_name']; endif;?>" name="table_name" />
					</td>
					<td class="td-mark"><span class="col-red">*</span> 数据表名不需要带表前缀，系统会自动加上</td>
				</tr>
				<tr>
					<td class="td-title">模型描述：</td>
					<td class="td-value">
						<textarea name="description"><?php echo isset($model['description']) ? $model['description'] : '';?></textarea>
					</td>
					<td class="td-mark">模型描述，该模型具体应用</td>
				</tr>
				<tr>
					<td class="td-title">内容来源：</td>
					<td class="td-value">
						<textarea name="source"><?php echo isset($model['source']) ? $model['source'] : 'HopeCMS';?></textarea>
					</td>
					<td class="td-mark">发布内容，内容来源字段，一行一个</td>
				</tr>
				<tr>
					<td class="td-title">是否启用：</td>
					<td class="td-value"><input name="disabled" type="radio" value="1" <?php echo (isset($model['disabled']) && $model['disabled'] == 1) ? 'checked="checked"' : !isset($model['disabled']) ? 'checked="checked"' : ''; ?> />是
						<input name="disabled" type="radio" value="0" <?php echo (isset($model['disabled']) && $model['disabled'] == 0) ? 'checked="checked"' : ''; ?> />否
					</td>
					<td class="td-mark"></td>
				</tr>
			</table>
		</div>
	</div>
	<?php if (isset($stauts)) :?>
	<input type="hidden" name="model_id" value="<?php echo $model['model_id'];?>" />
	<?php endif;?>
	<input type="hidden" name="token" value="<?php echo $token_code; ?>" />
</form>